package org.iteam.xlz.core.service.order;

import java.sql.SQLException;

import org.iteam.core.utils.SqlBuilder;
import org.iteam.db.BaseService;
import org.iteam.xlz.core.entity.order.OrderInfo;
import org.iteam.xlz.core.entity.product.ProductFreight;

public class SendService extends BaseService<OrderInfo>{
	
	private static SendService instance;
	
	private SendService(){}
	
	public static SendService getInstance(){
		if(null==instance){
			instance=new SendService();
		}
		return instance;
	}
	
	public boolean update(OrderInfo model){
		SqlBuilder builder=SqlBuilder.createUpdate("orderinfo");
		builder.addField("serialNo",model.getSerialNo());
		builder.addField("deliverTime",model.getDeliverTime());
		builder.addField("deliverStatus","1");
		builder.addField("status","4");
		builder.addWhere("oid",model.getOid());
		try {
			return super.updates(builder.getSql(),builder.getParams())>0;
		} catch (SQLException e) {
			e.printStackTrace();
			return false;
		}
	}	
}
